import urllib2,threading

url = 'http://219.239.182.116/vote/Vote.jsp?xid=70122&bid=20093487&cid=1'

times = 0

def vote ():
    for k in range(50000):
        global times
        times = times + 1
        print 'vote for',times,'times...'
	try:
            urllib2.urlopen(url)
        except Exception:
            print 'error'
            continue
        
	
voteThreads = []

for i in range(10):
     t = threading.Thread()
     t.run = vote
     voteThreads.append(t)
	
for vt in voteThreads:
    vt.start()


print 'finished'
	